#include "Object.h"
#include <cstdint>

namespace SL
{
	void Object::incRef() const
	{
		uint32_t refCount = mRefCount.fetch_add(1);
	}

    void Object::decRef(bool dealloc) const noexcept{
        uint32_t refCount = mRefCount.fetch_sub(1);
        if(refCount <=0){
            // throw error
        }else if(refCount == 1){
            if(dealloc)
                delete this;
        }
    }

} // namespace SL